<template>
	<section  class="chart-container">
		  <el-col :span="24">
                <div id="zidingyi" style="width:100%; height:400px;"></div>
        </el-col>
	</section>
</template>
<script>
  import echarts from 'echarts'
export default {
	data(){
		return {
  			zidingyi:null
		}
	},
	methods:{
		  drawZidingyi(){
                 this.zidingyi = echarts.init(document.getElementById('zidingyi'));
                 this.zidingyi.setOption({
                    xAxis: {
                        type: 'category',
                        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
                    },
                    yAxis: {
                        type: 'value'
                    },
                    series: [{
                        data: [820, 932, 901, 934, 1290, 1330, 1320],
                        type: 'line'
                    }]
                 })
			},
			  drawCharts() {
                this.drawZidingyi()
            },

	},
	  mounted: function () {
            this.drawCharts()
        },
        updated: function () {
            this.drawCharts()
        }


}
</script>